# from osqp import OSQP
import numpy as np
from osqp import OSQP
from scipy.sparse import csc_matrix

P = csc_matrix(np.array([[4, 1], [1, 2]]))
q = np.array([1, 1])
lower = np.array([1, 0, 0]).T
upper = np.array([1, 0.7, 0.7]).T
A = csc_matrix(np.array([[1, 1], [1, 0], [0, 1]]))

probe = OSQP()
probe.setup(P, q, A, lower, upper)
result = probe.solve()
if result.info.status != "solved":
    raise ValueError("OSQP did not solve the problem!")
print(result.x)
